#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
int main()
{
    char arr1[81] = { 0 };
    char arr2[81] = { 0 };
    gets(arr1);
    gets(arr2);
    int flag1 = 1;
    int flag2 = 0;
    int len1 = strlen(arr1);
    int len2 = strlen(arr2);
    while (flag1)
    {
        int i = 0;
        for (i = 0; i < len1; i++)
        {
            flag1 = 0;
            if (arr1[i] == arr2[0])
            {
                flag2 = 1;
            }
            int k = i;
            int j = 0;
            for (j = 0; j < len2; j++)
            {
                if (arr1[k] != arr2[j])
                {
                    flag2 = 0;
                    break;
                }
                k++;
            }
            if (flag2 == 1)
            {
                flag1 = 1;
                while (k < len1)
                {
                    arr1[i++] = arr1[k++];
                }
                while (i < len1)
                {
                    arr1[i] = '\0';
                    i++;
                }
                break;
            }
        }
    }
    puts(arr1);
    return 0;
}